variable "directory_name" {
  type        = string
  description = <<EOT
  {
    "Description": {
      "en": "The name of the directory. The name must be globally unique.\nThe name can contain lowercase letters, digits, or hyphens (-). The name cannot start or end with a hyphen (-) and cannot contain two consecutive hyphens (-). The name cannot start with d-.\nThe name must be 2 to 64 characters in length.\n**Note**: If you do not specify this parameter, the value of this parameter is automatically generated by the system.",
      "zh-cn": "目录名称。该参数必须全局唯一。"
    },
    "Label": {
      "en": "DirectoryName",
      "zh-cn": "目录名称"
    }
  }
  EOT
}

resource "alicloud_cloud_sso_directory" "directory" {
  directory_name = var.directory_name
}

output "directory_id" {
  value       = alicloud_cloud_sso_directory.directory.id
  description = "The ID of the directory."
}

